package com.example.decoratorParttern;

import com.example.decoratorParttern.decorator.RedShapeDecorator;
import com.example.decoratorParttern.model.Circle;
import com.example.decoratorParttern.model.Rectangle;
import com.example.decoratorParttern.model.Shape;

/**
 * 红色模型装饰器测试
 * sun 2017-12-15
 */
public class RedShapeDecoratorDemo {
    public static void main(String[] args) {
        Shape circle = new Circle();
        Shape redCircle = new RedShapeDecorator(new Circle());
        Shape redRectangle = new RedShapeDecorator(new Rectangle());

        System.out.println("Circle with normal border");
        circle.draw();

        System.out.println("\nCircle of red border");
        redCircle.draw();

        System.out.println("\nRectangle of red border");
        redRectangle.draw();

    }
}
